﻿@model Google.GData.YouTube.YtRating
@{ float likeswidth = 0;
   float dislikeswidth = 0;
   float likes = float.Parse(Model.NumLikes);
   float dislikes = float.Parse(Model.NumDislikes);
   float totalRatings = likes + dislikes;
   likeswidth = (likes / totalRatings) * 100;
   dislikeswidth = (dislikes / totalRatings) * 100;   
}
<div class="ratingbar">
    <div style="width:@likeswidth%" class="ratingbar-likes">
    </div>
    <div style="width:@dislikeswidth%" class="ratingbar-dislikes">
    </div>
</div>
